/*
 * Copyright 2023-2025, Haiku, Inc. All rights reserved.
 * Distributed under the terms of the MIT License.
 *
 * Authors:
 *   Haiku Development Team
 */
#ifndef _KERNEL_BOOT_PLATFORM_EFI_ARCH_LOONGARCH64_SMP_H
#define _KERNEL_BOOT_PLATFORM_EFI_ARCH_LOONGARCH64_SMP_H

#include <SupportDefs.h>
#include <boot/kernel_args.h>

#ifdef __cplusplus
extern "C" {
#endif

// 注册CPU
status_t arch_smp_register_cpu(platform_cpu_info** info);

// 初始化SMP
status_t arch_smp_init(void);

// 启动辅助CPU
status_t arch_smp_boot_other_cpus(kernel_args* kernelArgs, addr_t entryPoint);

// 获取当前CPU ID
int32 arch_smp_get_current_cpu(void);

// 获取CPU计数
int32 arch_smp_get_num_cpus(void);

#ifdef __cplusplus
}
#endif

#endif /* _KERNEL_BOOT_PLATFORM_EFI_ARCH_LOONGARCH64_SMP_H */